<%--
  Created by IntelliJ IDEA.
  User: qiliping
  Date: 15/12/16
  Time: 上午11:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>


<html>
<head>
    <title>后台权限点管理</title>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            系统设置
            <small>后台权限点管理</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/main">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="${ctx}/sys/user_list">
                    系统设置
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    后台权限点管理
                </a>
            </li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<div class="main">

    <div ><a href="${ctx}/sys/permissions_add" class="btn blue">添加后台权限点</a>${error}</div>
    <div class="row">
        <div class="col-md-12">
            <table class="table table-striped table-hover zqy-table">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>名称</th>
                    <th>是否模块</th>
                    <th>是否菜单</th>
                    <th>权限标识</th>
                    <th>URL</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="item" items="${list}">
                <tr>
                    <td>${item.sysPermissionId}</td>
                    <td>${item.name}</td>
                    <td>${item.isModel}</td>
                    <td>${item.isMenu}</td>
                    <td>${item.permissionKey}</td>
                    <td>${item.url}</td>
                    <td>
                        <fmt:formatDate value="${item.createOn}" pattern="yyyy-MM-dd"></fmt:formatDate>
                    </td>

                    <td>
                        <a href="${ctx}/sys/permissions_edit?id=${item.sysPermissionId}" class="btn btn-xs">编辑</a>
                        <%--<a href="${ctx}/sys/role_del/${item.sysRoleId}"  class="btn btn-xs" data-delrole-confirm>删除</a>--%>
                    </td>
                </tr>
                    <c:forEach var="it" items="${item.childs}">
                        <tr>
                            <td></td>
                            <td>${it.name}</td>
                            <td></td>
                            <td></td>
                            <td>${it.permissionKey}</td>
                            <td></td>
                            <td></td>
                            <td>
                                <a href="${ctx}/sys/permissions_edit?id=${it.sysPermissionId}" class="btn btn-xs">编辑</a>
                            </td>
                        </tr>
                    </c:forEach>
                </c:forEach>

                </tbody>
            </table>
            <div class="text-center">

            </div>

        </div>
    </div>

</div>
</body>
</html>
